Prevent duplicate messages.(Different approach)