gold futures close down $3.40 at $581 an ounce