this should resolve the duplicated messages issue