fix minor python snippets