Redo stage 1.

Thanks to Codeslave for the help.