@vrabaud , I suggest reordering these `if`-s