Reverted change in resource availability check because it caused the method wasn't working correctly