Fix escape sequences in macro system