No bug if minY and maxY are the same