fix minor flaws