fix slide motion bug