Fixing problems in clearcache command