Fixed code for RethinkDB v1.14