Use query instead of params for check.