correction for bug with null address

correction for bug with null address