fix exception caused by null config