fixed empty messages bug

fixed #23