Fixed cache update bug