Fix excessive calls to x() and y()