More python3-related fixes