Fixes animate:close bug