Fix log scaling in the face of missing values