Fixed the problem with animation when moving an object