Better escape handling