Small python fixes