fix for address undefined error