Added long press handling and sanity checks