add a check on setting swipeEnabled