fix delete order errors

#### Reviewers
@jframos @flopezag

#### Description
FIX destroy method to keep data consistency 

#### Test
Tested locally
If I have to check this method, it is very difficult to understand all the process due to you have almost 100 loc on it.