don't set location before we know the result was okay