Fix advgen