Fixing animation issues