Update stage 2 to work better with pg