cache bug fix

As reported in http://www.mobileread.com/forums/showpost.php?p=2410243&postcount=95

Any one who want to get the test file, just send me a mail :)