Improving and correcting package update detection code