fixing max height bug