ME-147 Changed escape function