fixed bug with edit