bug fixes on search