fix a potential issue with data receiving