Fixed mapheight/width and maxheight/width

Fixed mapheight/width and maxheight/width