Modify refineG to get a better G.