diff --git a/src/mol-script/transpilers/_spec/rasmol.spec.ts b/src/mol-script/transpilers/_spec/rasmol.spec.ts
index f8206d87b891657b5fcb318be2be4c3d7729b8fc..77b42605e89604a75929154041863b51db74db10 100644
--- a/src/mol-script/transpilers/_spec/rasmol.spec.ts
+++ b/src/mol-script/transpilers/_spec/rasmol.spec.ts
@@ -29,14 +29,15 @@ const general = {
         ' [ALA] and [VAL] ',
         '  [ALA] and [VAL]',
         // within with whitespaces
-        'within (   5 ,  [HEM]) ',
+        'within (   5 ,  [HEM] ) ',
     ],
     unsupported: [
         // un-braketed residue name
         'LEU and ILE',
         // un-parenthesized residue index
         '100-120',
-        // un-parenthesized within in the head or middle of sentence
+        // within in the head or the middle of sentence
+        'within (   5 ,  [HEM] ) and backbone',
     ]
 };
 
diff --git a/src/mol-script/transpilers/helper.ts b/src/mol-script/transpilers/helper.ts
index ae5976abd251c59de67d920487998c3eca0ad7e6..39791def6aa60563ad0381378bb7a20fe0f8ee9c 100644
--- a/src/mol-script/transpilers/helper.ts
+++ b/src/mol-script/transpilers/helper.ts
@@ -31,7 +31,7 @@ export function prefix(opParser: P.MonadicParser<any>, nextParser: P.MonadicPars
 
 export function prefixRemoveKet(opParser: P.MonadicParser<any>, nextParser: P.MonadicParser<any>, mapFn: any) {
     const parser: P.MonadicParser<any> = P.MonadicParser.lazy(() => {
-        return P.MonadicParser.seq(opParser, parser.skip(P.MonadicParser.regexp(/\)/)))
+        return P.MonadicParser.seq(opParser, parser.skip(P.MonadicParser.regexp(/\s*\)/)))
             .map(x => mapFn(...x))
             .or(nextParser);
     });