edit was creating a new resource - bug fix