Close brackets properly