Reordering build steps so they are correct