fixes error in motif comparisson