minor bugfix in core. bug resulted in Some mods crashing the Core