resolve NullPointerException