fix bug in constructor for core modules