Replace lock/unlock with synchronized statements in Meta.