fix repeat handling by making start_time static