bug fix when WIF file is poorly formated