fixed potential cache corruption