fix NullPointer on empty db; add PK to BlogEntries