added minimal changes to make it work for joomla 3.2.1