Fixed material map indexing issues.