Fixing for the new API