Fix bug when there are no custom modules.