moved sync unlocks to defer statements.