switched .type to ['type'] to failures on some machines