fixed the close brace bug