Fixed an issue with sendMessage that I introduced with the last commit.