Fixed the membership factory