Fixing error in output