some minor tweaks thanks to hugo