adds resource caps and blocks double refinement bug
Merge pull request #61 from biversen21/master

adds resource caps and blocks double refinement bug