fixed some logic bugs with scramble