Fixed logic bug in jsonproxy.php