eliminate leaks of option structs