Fix unit tests in PreferencesTest
Fix unit tests in APITest
Merge branch 'fix-#69-cookie-freeze'