fixed duplicate output