fixed bug with editing