fixes an undefined bug when not using field names index