fix resource.c