fixing max,mini in xy_xval