Update docs for regeneration, fix bug in regeneration.