maxHeight bug fix