clean query emf