Ensure X and Y values are integers.

This can bite you if your map is a certain size or ratio or something like that. This may save you the headache's I've suffered today :)