Fixes issue with double clicking on menu items