fixes viewer when tileset size isn't multiple of tile size