Bugfixes in type hinting