fix addhelper to use spread rather than array index