fix error with unknown initialization sequence of global variables