add conditional for view mode
Merge pull request #831 from YaleSTC/830_hotfix

add conditional for view mode