fixed small bug in keeping track of subj id