Fixes animation problem