Fixed multi-material bug.