Added call to generate() when creating views

WARNING! Quick hack, barely tested, but seems to work.