Fixed a bug in the update tool.