Fix exception when there are no brackets