Fixed tile merge bug