improved loading settings from cookies.