Changed the getMessageCode behaver.