Fixing shuffle functions.