Fixed code to correspond with door directions