More bug fixes regarding search