correcting a little bug when escaping scripts