Fixed problem where searching for only one resource would fail