[#485] fixed a potential issue when ratio is defined to 0 in Tiled