Added else statement in delete