Lock tuning and registry release fix.