fixed bug with edge deleting