Hack to somehow fix drawTiles for html5 target