missed a null check