Fix error in view initialization