Minor bug fix
Fixing incorrect SQL view-creation syntax and bad view name generation