 
       # Set the transition to be used
       if options.transition
-        @didFadeAndPush = true
+        @willCustomPush = true
         @transform = @["#{options.transition}Transform"]
-      else if not @didFadeAndPush
-        @didFadeAndPush = false
+      else if not @willCustomPush
+        @willCustomPush = false
         @transform = @slideTransform
 
       if isPush or @stack.length is 0 and not @preventTransition
         @pushView(nextView)
 
       else
+        if @willShowDialog
+          prevView = @removeDialog(nextView) or prevView
+
         @stack = @stack.slice(0, @stack.indexOf(nextView) + 1).concat(prevView)
 
         # Ensure the view we pop to is underneath in the stack
         @stack.unshift(nextView) if @stack.length is 1
         @popView()
+        @willHideDialog = false
+        @willCustomPush = false unless options.transition
 
     # Get the last view in the stack, push the new view and activate it.
     pushView: (view) ->

    popView: ->
      @activateCurrentView(@stack.pop(), false)

    # Perform two transitions synchronously. Get the next view, and get it
    # ready to animate. Remove events from the old view.
    activateCurrentView: (prevView, isPush) ->
      nextView = @stack[@stack.length - 1]

      @cleanup(nextView.$el)

      if @preventTransition
        nextView.delegateEvents().$el.show().addClass("active")

        @transitionView prevView, false

        # ... and then set initial transforms
        @transform prevView, 0, not isPush unless @willShowDialog

        unless @willHideDialog
          @transform nextView, @endRatio(isPush), isPush

        @$el.get(0).offsetWidth

        # Add transitions and set new transforms
        @transitionView nextView, true
        @transform nextView, 0, not isPush

        unless @willShowDialog
          @transitionView prevView, true
          @transform prevView, @endRatio(not isPush), not isPush

        # After the transition has occured, hide
        window.clearTimeout @transitionOutTimeout
        @transitionOutTimeout = window.setTimeout (=>
          nextView.delegateEvents()
          prevView.$el.removeClass("active")
          prevView.$el.hide() unless @willShowDialog
          @clearTransforms nextView
          @clearTransforms prevView
        ), @ms + 100
