fix for sweeper code