Move 3rdpartyFields to a better position

Placing the event `3rdpartyFields` into the if statement makes more sense.