t642: fix the null pointer exception.