Pack of fixes for python3 modular interface