fix tiling issue, remove setTimeout, add callback