attempted to fix segfault that seems to happen from calling shuffled