fixed bugs of checking for updates