fixed bug with empty messages