Fix for decoded calculation bug.