cleanup & logging for select_cycle
more debugging for weird window_remove case