Fix escape and unescape