Fixed bug in closing a door that referenced a wrong variable.