corrected resource mgmt bug