Changed the logic for simulating messages lost.