wrapping kpm restore in try/catch. fixed #10 fixed #11