Fix character search crash