Small fixes to perplexity and nll

This PR makes two small fixes to the Perplexity feedback and NLL loss.