Fix faults in code