bugfix to create view