#1 turn pedal over and check connections at speed control switch and the on/off button. Could have a shorted connection from the water or one that is loose. Water in switch or switches.
#2 check the connections on back of tach. Most gauge problems that are intermittent like that I have found to be loose connections or bad ground.