Fixed a issue with collecting messages