fixed a bug with bad message format