Fix missing brace, and properly indented code