Fix some bug int the edition function (on validate).