Fixed sufficient resource check.