Fixed issue where debug messages in ajax calls broke stuff.