Fixed bug in Autosweep