Fixed bug: Crashed when all the modules were removed.