refactor
refactor: s:reg_restore()
fix test