bad generated view code