fix resource problem