Fix abort scan and randomize scan start