Check number of windows before anything else in prev_win