Fixed several caching issues