Refactoring to ensure correctness when theres no message loss