some fine tune so that the message box will expand when needed