fixing null address issue