Fixed compilation errors and silly bracket mismatch.