[#3594] Nice tweaks thanks to @WouterJ and @xabbuh