fix missing ending braces