It is often of interest experimentally to assess how synchronization between two neurons changes following a stimulus or other behaviorally relevant marker. The joint peristimulus time histogram (JPSTH) achieves this, but assumes that changes in the cells' firing rate following the stimulus are stereotyped from one sweep to the next. Erroneous results can be generated if this is not the case. We here present a method to assess whether there are variations in response latency or amplitude from sweep to sweep. We then describe how the effects of response latency variation can be mitigated by realigning sweeps to their individual latencies. Three methods of detecting response latency are presented and their performance compared on simulated data. Finally, the effect on the JPSTH of sweep realignment using detected latencies is illustrated.