Fixing type ahead query handling.