minor messagebox optimization