Fix too long input in search bug