Improved regenerate.