Shouldn't there have been a null check here?