Fixed possible null-pointer-reference.