fix for resources which have not equal amound and maxAmount
Merge pull request #1 from Alewx/master

fix for resources which have not equal amound and maxAmount