fix a bug in the parseMessage function..