fix update packages method