More python fixes