Fixes invalid search character issue