Debugging/Fixing some issues with search