fix bug in deletion of fragments introduced with commit 06dbc018e9d6bed36bb921d4d70d710cf1b8c179