Added error handling. Actually it seems to work, but I need a client
capable of sending a valid message...