Minor fix with registering a window