Fixed total_seconds function.