Fixes in generation of result CSV