bugfix on correct window being sent