Fixed an array null issue