Fixed problem on locking mode so that the unit will shutdown properly.