fix bug in Cache