gold ends 0.3% higher at $1,664.80 an ounce