[#2866] Minor fixes thanks to @stof and @WouterJ