Fix up all grammar errors in the given sentence.
And when thinking his future, he felt pessimistic due to the thought that he would have to confront the problem of old age.
And when thinking of his future, he felt pessimistic due to the thought that he would have to confront the problem of old age.