Minor bugfixes and additional database index.