First check the thermistor connection at the board. Is it plugged in correctly and to the correct position. (Hotend thermistor goes to TH1 and the beds thermistor goes to TB - remember that polarity doesn't matter for thermistors).
Next try removing and reinstalling the offending thermistor from the bed or hotend.
When reinstalling the thermistor you will need to be very careful that the exposed end of the wiring is not being crossed or touching any of the metal on the bed or hotend - this will cause an error.
The screw that holds the thermistor to the block also shouldn't be on too tight as it can strip the wiring and cause it to short.
Also check that the thermistor cable isn't being pinched any where.
Try swapping the thermistor for the heated bed and hotend around, does the problem follow the the thermistor?
If so you may need to replace the thermistor.