fix bugs of cleaning cache;
fix minor bugs