Fixed xdim/ydim update bug