fixed some issues with braces