third attempt to fix NullPointerException