fix a number of broken lockfile scenarios