Fixing saving preferences