Bugfix in delete command