Fix resource load/unload.