Second attempt to fix nullexception