Fix views_api hook