fixed if statement for not sending empty messages