Changing to doctype RAW instead of XML. Joomla acted weird.
Adding JURI::root() to the links.