Fix incorrect table gathering