COMPAT: fixes for pickle testing