fix bug in delete routine