Fixes the menu logic

In some situations a new menu folder was not created, this is now fixed.