Cache and other fixes