fixed the initialization errors.