fix NullPointerException error