Fixes NaN issue on bad write