Fixed right-click exit procedure.