fixed bug where resources could no longer be allocated if they had ever been maxed out