fixed sweep direction bug