some small fixes found by @samuelgruetter