Fix the crash when can not get the mac address
Fix code error