make create_mac_string more robust