Fixed minor flaws