Fix lua error when using dispenser