Fix bug with database entries.