fix case bug in core