Makes nan elements 0.