Merge pull request #298 from dizzzz/fix_localmode_repair

Make repair functions work for embedded/local mode of client