Add the core module to the setup.py
Fix a bug introduced in ca0950d