Fix tilemapbuffer

#921, #922