fix for #502
Merge branch 'next' of github.com:rethinkdb/rethinkdb into next