fixed some compatibility issuses with Joomla! 3.0