Adding flag to catch swipe events