fix bug when recording inter contact time