Fix warning.
Simplify resource manager API.