Not a fan of how this got reformatted. :/ I'd probably de-indent L180-181 by one level.