I tried to fix the bug with the potion effects array and the anvil command. I may have fixed the array bug, but I have no idea what's wrong with the anvil command.