Please correct the grammatical flaws in the text:
When people have an improved standard of living they will be able to contribute and sustain the economy.
When people have an improved standard of living, they will be able to contribute to and sustain the economy.