Added all missing brackets to make it well-formed