Fix issues when searching