fixed iteration result in motif.py