Fixed cannot create materials bug.
Merge pull request #469 from est77/master

Fixed cannot create materials bug.