Fixed message sending bug