fix type is not JSON serializable