fix null type exception