[#1039] Tweaks thanks to @stof and @WouterJ