improve coverage, test memory leak workaround