Nil pointer crash fix.