Fix indentation bug in calc_dwell_stats