upgrading ttapi and some bug fixes. fixes #17