fixes #26 made lock recovery more efficient by caching and batching

Should this be longer?