All he had to do was to repair the sky.
He had to fix the sky, which was broken.