fix bug can not create resource