Fixed bug/typo in regenerate...not sure how I missed it.