Fixed detectFaults function
 - Had to pass object as a parameter