fixed bug in using same var for y and g1 - when x factor; and making sure to flush all dev.hold()s