weird to_json issue