fixed useless contains call in core