Fix condition for delete

Change-Id: Iced0d75a2e93be1ae15f0e5a14a3a26202c5538c
Merge topic 'fix_delete_condition' into master

0efbb03c Fix condition for delete