fixed and improved MessageBox