Write queue after connect windows

Which was a mistake, I grouped it together with the others again.