fixed double init bug