Feature/fix show sub menu rebase

Rebase of #1926
Hopefully tests will work after rebasing