Avoid crash in login as window