Fixing bug that would cause sliding animation to fail.