Fixed several cache issues