fix mocking problem with pickle magic