Fix hook creation.