a few bugfixes and a few more python utils