REK: fixed syntax error in calculate_history_metrics.pro