fixed create view and fixed emit events