fixing ArrayIndexOutOfBoundsException in TouchController