Edit config correctly by escaping variables.