Fixed bug returning ids from updated docs