Debug fixes to tb and rtl. Now it seems to work.