Fix json serialization