Fixed issue with preferences factory class generics.