Fixed regeneration error