US stocks end lower