fix edit function(PRODUCTION)