fix the hierarchy