Fix json serializability.