Fixed a bug in updating the message box.