fix reading preferences