Added support for adaptive height