Changed scramble
Fixed error checking for quality