fixed bug in checkUpdate()