fixed the bug that the door would not aoutolock if the door was unlocked matically. It was a problem from adjusting the wait period it created an infinite loop.