fixed errors with missing brackets