edit validation bug fix