Small changes to migrate api hook