fix bug in window class with screen height