fix result table generation