UI thread responds to messages even though it is blocked by message box