Fixed cannot create materials bug.