/id/entity paths corrected
rethinkdb query fixes