selects correct window by default