Fixes a bug in search that caused it to lag one character behind.