Fix any grammar errors in the following sentence:
To prepare for the growing demand of the ageing population, more government funding is required in providing better infrastructure and amenities for the elderly.
To prepare for the growing demand of the ageing population, more government funding is required to provide better infrastructure and amenities for the elderly.