fixed bad issue with preference storing