Fixed #1. Emit ready if config.modules is undefined or empty.