use .name() instead of .toString() on Material (thx cryptkeeper)