position submenu correctly when re-rendering