Fix the bug with the resource manager

Disposing of the resource manager caused the asset manager to be
disposed, and using a disposed asset manager isn't a very good idea.