fixed some bad chars and missing brackets