fix invalid character filter