fix sql return (was scalar, who'd a thunk?), fix csv header