fixed search bar issue wherein it used to crash when the text was not cleared and when touched outside to dismiss