Do not hang when the window size is the same as the message size