Fix unreliable jsonrpc behavior