Corrected bugs in homogeneous csv writer