fixed long standing bug with caches