fixed double declare bug