on commit removes node if empty