fix pickling