pithos: several minor improvements/fixes