Fixing bug with callback in Animation