Fixes for broken python3 build