make sure the gui gets not too big