fixing pickling problem