Fixed bug in getmaximumheight
changed some floating point values to doubles.