Fix menu display when in the edge of the screen