Small fixes to perplexity and nll