Fixed subtle bug on state init order

Before, OnInitialize would be called before the derived constructors. So any private variables that are set in the derived constructor but used in the derived OnInitialize would all be null at the time of initialization.