[#3021] Minor tweaks thanks to @WouterJ and @GromNaN