Menu items were positioned at the wrong position after the window had moved