corrected an issue with caching, where an empty array could cause delays