fixed some isues in escaping