fixed unitialized value in output