fix cache loading bug