fix NullPointerException.