fix the bug that cache is not properly loaded