Fixed issue #66 caused by insufficiently clever calculations of where to position the menu.