fixed potential null pointer access detected by FindBugs