fix referencing core instead of this.core.