Fixed bootstrap order of initialization and apply apigen patch manually