bugfix in cache mode