fix table rendering and tests