Added some debugging for materials