cleanup of erplab_getsweeps