Adopted changes for Faults decoding by kzjeef