Temporary fix for casting issue in core