fixed some rethinkdb issues