fix viewPath' bug, improve code
Merge pull request #11 from zensh/master

fix viewPath' bug, improve code