diff --git a/src/operators/groupBy-support.ts b/src/operators/groupBy-support.ts
index 9027480260..73af4499d3 100644
--- a/src/operators/groupBy-support.ts
+++ b/src/operators/groupBy-support.ts
@@ -30,13 +30,13 @@ export class RefCountSubscription<T> extends Subscription<T> {
 export class GroupedObservable<T> extends Observable<T> {
   constructor(public key: string,
               private groupSubject: Subject<T>,
-              private refCountSubscription: RefCountSubscription<T>) {
+              private refCountSubscription?: RefCountSubscription<T>) {
     super();
   }
 
   _subscribe(subscriber: Subscriber<T>) {
     const subscription = new Subscription();
-    if (!this.refCountSubscription.isUnsubscribed) {
+    if (this.refCountSubscription && !this.refCountSubscription.isUnsubscribed) {
       subscription.add(new InnerRefCountSubscription(this.refCountSubscription));
     }
     subscription.add(this.groupSubject.subscribe(subscriber));
diff --git a/src/operators/groupBy.ts b/src/operators/groupBy.ts
index 0cfbea43b6..6a795e3614 100644
--- a/src/operators/groupBy.ts
+++ b/src/operators/groupBy.ts
@@ -69,7 +69,7 @@ class GroupBySubscriber<T, R> extends Subscriber<T> {
         let groupedObservable = new GroupedObservable<R>(key, group, this.refCountSubscription);
 
         if (durationSelector) {
-          let duration = tryCatch(durationSelector)(groupedObservable);
+          let duration = tryCatch(durationSelector)(new GroupedObservable<R>(key, group));
           if (duration === errorObject) {
             this.error(duration.e);
           } else {