fix in mismatch handling

fix issue #13