Correct handling of OK buttons so when not closing set the result to none to prevent auto close