Added fixes to CreateViewCommand