Some minor updates thanks to @mwiebe