Changed caching behavior + minor fix