Buncha fixes and tb stuff