Write queue after connect windows

Because I assigned the last request badly in the write function.