Bugfixes and minor changes
Merge branch 'feature/tdapi' into develop