resolve misaligned sorting issues - issue #250