fix crashes when cache is >= 8Gb