Fixed a minor bug in rescource allocations.