fixed bug in Joomla3.1