[#3405] Tweaks thanks to @WouterJ and @xabbuh