Fixed a few bugs in get_updates