Fix dupe bug/crash bug