Fixed to cope with API change.