Fix for 0 width/height tiles in drawTiles, and compile fixes