Correct the betasigmahat function