fix missing semicolon and brackets