Fix for IO#closed?