fixed a few bugs with the swiping