Impove power-good decoder algorithm