Fix database object call and various revision queries.