Fix inactive when scripts do not load

*Ready to deploy.* This pull request attempts to fix the `inactive` callback not being called when a module script fails to load. This has been reported in issue #142.