fix curly brackets insertion