fix NullPointerException