fix bug about msgcache