fixed bugs in temporal_analysis