fixed errorhandling on delete