fixed bug with changing xmin/ymin