Tiny changes to make gensrwd work OK