Fixed minor bug with search