Modifying template so that missing arrays don't throw errors.