fix hanging lockfile, fixes #2