Fixed an issue with the resource manager adding null resources