prevent resource attack