Attempt to fix NullPointerException