Code clean up.
Bugfix: error occurs when there are no module menus available.