fixed usage of User defaults as a singleton