Firm dollar halts energy and metals rally