Fixed more bugs, curly braces