fixed bug where resources which have no definition in them are loaded multiple times