Thanks Tiago Neiva for the idea (and the previously commited code)