Assorted bugs.

openscholar/openscholar#5830