Fixing issue with , adding event dispatch on rootscope