Fixing Python classes