fixed some bugs with not determining updated packages well