fix stupid bug where table is written into html instead of inserted into dom