bug fix. Caching done correctly.