fix wizard and error hanling in materials delete