Updated the code to rotate doors properly