fix calling getStackInSlot twice