search bugfix: drop temp table