Fixing flash on click and search bug