Make smoother animation when swiping