Fixed the bug with the door opening event.