Fixed incorrect space treatment in search