minor fix
Avoid issue if enviroment helper called before joomla route event