Corrected order of initialization