py3 fixes for csv result format