added a fix for the new way resources should be accessed