gold ends modestly up as risk aversion returns