Fixed a couple of issues with mathching resources against clusters.