August gold up 0.4% at $1,238.30 an ounce