[0401] Fixed queries in previous update

* Reintroduced DELETE queries in 0400 that were commented out on testing
purpose and should have been fixed before commiting.