Fix the removal of do while, move the PAD_UNLOCK_EVENT in chain