bugfix in cache mechanism