the location redirection goes in to the header even when when XMLRPC is being used.
here's a fix (including the exit() from before)
//Redirect Page
if(strpos($_SERVER['SCRIPT_NAME'], 'xmlrpc.php') === false) {
ob_start();
header("Location: ".$redirection);
ob_end_flush();
exit();
}