Fixing the signalEntropy function.