prevent miny/minx from being less than 0