fix duplicate output