fix wrong bracket nesting