fix a bug in scatter input path