Fixed Linux initialization order issue and compile error