Use 0 if no values are set
Fix NaN issue