Fix up static constructors to work with subclasses