fix resource registration