Detecting or preventing malfunction