Fix for updated API