Write queue after connect windows

my comment doesn't make sense, ignore it.