Added logic for mode based click selection