Fixed bug with negative x/y coordinates