Delivery code was looking at incorrect state