fixed #285 fix invalid height

Fix animation sometimes failing to finish with full height