fix resource rule bug