nit: (I know you didn't write this in this patch) please put the condition between brackets, this is not so readable at the first glance