Fixes and joomla 3.1.5 campatibility