Fix static initialization order problem