Fixing bugs in python examples