fix the gcc warning about the initialisation order of variables caused