Fix #384 - Dupped filedescriptors