Fixed bugs on Local cache