Improves comparer

Should fix issue #28.