Fixed lock serialization issue.