fixed material bug