Fixes for failing python3 build