Fix root generation