Switched key-check order to fix glitch of key disappearing without opening door