get_values() and get_times() fixed to include the final value and time