Fix the return behaviour of deleting a node

Change-Id: I477d3e0146b57a6d3b01941caa8633fac69a93ad