Adding a JFactory::getApplication()->close() in the updateinfo method of the cpanel controller to prevent any HTML errors (thanks @jurianeven)