Add matd chunk. Need to debug and fix.