fixed bugs in recordsweep (tested on real hw)