Changed to check for resources