fixed a bug in tilewrappercomparator