Wal-Mart agrees to safety fixes at 2,857 stores