attempt at fixing over zealous to_json restriction