Take the planned nodes into account when checking the instancecap.
Fix NPE when label is null
Merge pull request #51 from spark404/instancecap

Take the planned nodes into account when checking the instancecap.