Small fixes, Java and Python snippets