fix cycle retained memory leak