Fixed errors in autosweep