fix bug with screen end