Bugfix missing database query errors and add DBObject::findFirst() convenience function