fixed gscramble to work for sm1.7