fix resource manager