Fixed the shuffle and loop methods.