Fix view generator
Merge pull request #313 from Jake0oo0/fix-views

Fix view generator - #306