Fixed macosx python3 issues