fixed double print issue