fix order of initialization error