 			
 			unlisten = $rootScope.$on 'shrubFinishedRendering', ->
 				unlisten()
+				
+				# Catch any path changes.
+				if path isnt $location.url()
+					context.redirect = $location.url()
+					
 				formFn()
 				
 			$rootScope.$apply -> $location.path path

			return fn error if error?
			fn null, contexts.add id, context
		
	navigate = ({shrub, window}, path, body, fn) ->
		
		{$location, $rootScope, forms} = shrub
		
		# Process any forms.
		formFn = ->

				# Touch the context to keep it alive.
				context.touch()
				
				# Emit the last HTML generated before the redirect.
				if context.redirect
					return process.nextTick ->
						res.end context.redirect
						context.redirect = null
				
				# Prevent a possible race condition that would hang up the
				# context in between now and render.
				deferred = Q.defer()
