Fixed some missing brackets and bad map