fixed bug appending empty messages