Fixed rightmostX and leftmostX