fixed swiping bug