fixes to scrambler