fix sweep bug