Fix multiple-message bug