Fixed a bug which caused messages to be sent even when processing failed on a received message