fix cache system bug and remove warnings