Fix build errors. Add braces to if and newline to end of file