fixing swiping bugs