Fixed bug with negative values of setX and setY.