Fix backward compatibility and fix examples.