fix leaky FDs