don't leak memory when preprocessing