missing reset of lockRetries added.