Bug correction on materials when using numpy