Fix bug in animation time