hotfix visit_number restore bug