Fixed python code