fixes #6609 construct menu via hooks