fixed search term encoding bug