Fixing dimx dimy from sizex sizey