fix messsed up brackets