Added workaround for arrays that are returned by the REST API