fixed a small bug with resupply variable