You'll need to setAmount(1), as `itemstack.a(int)` splits the stack, so itemstack1 was always of size 1.