fixed bug with listening on rootScope events