Fixes to bugs in nearestDSmax_RE.cu and utils.cu