fix as_json problem