fix time wrap when playing animations in reverse