Bugfix

Fixed a bug in the handling of _rev from database