Fix view generator - #306

#306