zero maxX and maxY before computing coords