Fix backward-compatibility code