Well now I am stumped

. I have removed the 3 other pins, and now the sd and network work. I can log in with joyreef etc and that side is fine but it will just not let me stay on the home screen. My code for the my touch that was changed is
void processMyTouch()
{
myTouch.read();
int x, y; // Coordenadas do touch screen
x = 399-myTouch.getX ();
y = 239-myTouch.getY ();
if(temperatura_alta == false) // Limpa mensagem de que a temperatura dos leds esteve alta.
{
temperatura_baixou = false;
}
if ((x>=iniC[0]) && (x<=iniC[2]) && (y>=iniC[1]) && (y<=iniC[3]) && (dispScreen!=0) && (LEDtestTick == false) && (horario_alterado == false)) // volta ao inicio
{
waitForIt(iniC[0], iniC[1], iniC[2], iniC[3]);
if((dispScreen == 5) || (dispScreen == 28))
{
ReadFromEEPROM();
}
else if(dispScreen == 10)
{
ler_wave_EEPROM();
}
else if(dispScreen == 30)
{
stCurrentLen=0;
memcpy(stCurrent, limpar_senha, sizeof(limpar_senha));
}
else if(dispScreen == 22)
{
ler_predefinido_EEPROM();
}
periodo_selecionado = false;
dispScreen=0;
clearScreen();
mainScreen(true);
}
else
{
switch (dispScreen)
{
case 0: //Tela de inico
dispScreen=1;
clearScreen();
menuScreen();
break;
and this is the touch section on ferduino tab
UTFT myGLCD(ITDB32WD, 38,39,40,41); // "ITDB32WD" é o modelo do LCD
UTouch myTouch(6,5,4,3,2); // Comente esta linha para usar o Ferduino Mega 2560
//UTouch myTouch(7,6,5,4,3); // Descomente esta linha para usar o Ferduino Mega 2560
unsigned long previousMillis = 0;
String day, ano;
byte whiteLed, blueLed, azulroyalLed, vermelhoLed, violetaLed; // Valor anterior de PWM.
byte dispScreen = 0;
If anyone has any other ideas why it man be doing this, I would appreciate it.
To confirm the problem, It loads the main screen and after it jumps straight to menu1, if you click home button, it loads that screen then jumps straight back again.