fixed reinitialization bug