Added index check when scrolling up before deactivating next menu item

Addresses #2