Fixed a bug in settings cache