fixed message sending in CLI (issue #91)