Small fixes and improvements to update cache