In Bondal and Kapranov's paper enhanced triangulated categories, a twisted complex over a DG category $A$ is a set $\{(E_i)_{i\in \mathbb Z}, q_{ij}: E_i\to E_j\}$, where $E_i$ are objects in $A$, equal to zero for almost all $i$, and the $q_{ij}$ are morphisms in $A$ of degree $i-j+1$ satisfying $dq_{ij}+\sum_k q_{kj}q_{ik}=0$.
Let $C=\{E_i,q_{ij}\}$ and $C'=\{E_i', q_{ij}'\}$ be two twisted complexes. Put
$ Hom^k(C,C')=\bigoplus_{l+j-i=k} Hom_A^l(E_i,E_j') $ and, for any $f\in Hom_A^l(E_i,E_j')$
$df=d_Af+\sum_m (q_{jm}f+(-1)^{l(i-m+1)}fq_{mi}),$
where $d_A$ is the differential of the DG category $A$.
It seems to me that the differential defined on the twisted complexes does not satisfy $d^2=0$ and the graded Leibniz rule. How do we check it is indeed a well-defined DG category?