Patched rpc.php