finished fixing the exit button for the popup menu