Fixed fd leaks and AUTH timeouts problems