fixed visitor
Merge pull request #826 from yilongli/fixing-issue-825

fixing issue 825