Material bug fix