Issues with NavigationManager

I am currently developing an application and I am using a navigation manager in it. The structure is like this: There are mainly three top classes, UI class, a Login class and an ApplicationLayout class.
After the successful Login the LoginLayout will be replaced by the ApplicationLayout class. Inside application layout the actual navigation begins. Based on the button clicks on the menu, it displays several Layouts.
Everything works fine, but if I start playing with the “Back’” button of the web browser its gives me exception. I am getting this exception when I try to go back to the root (first url that was present when the app was launched).
The exception is this:
May 17, 2013 12:52:03 PM com.vaadin.server.DefaultErrorHandler doDefault
com.vaadin.event.ListenerMethod$MethodException: Invocation of method uriFragmentChanged in com.vaadin.navigator.Navigator$UriFragmentManager failed.
at com.vaadin.event.ListenerMethod.receiveEvent(
at com.vaadin.event.EventRouter.fireEvent(
at com.vaadin.server.Page.fireEvent(
at com.vaadin.server.Page.updateLocation(
at com.vaadin.ui.UI.changeVariables(
at com.vaadin.server.AbstractCommunicationManager.changeVariables(
at com.vaadin.server.AbstractCommunicationManager.handleBurst(
at com.vaadin.server.AbstractCommunicationManager.handleVariables(
at com.vaadin.server.AbstractCommunicationManager.handleUidlRequest(
at com.vaadin.server.VaadinServlet.service(
at com.vaadin.server.VaadinServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.IllegalArgumentException: Trying to navigate to an unknown state ‘’ and an error view provider not present
at com.vaadin.navigator.Navigator.navigateTo(
at com.vaadin.navigator.Navigator$UriFragmentManager.uriFragmentChanged(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.vaadin.event.ListenerMethod.receiveEvent(
… 27 more

I have searched the forum regarding this issue, and I saw that it should work fine if I add something like this : nav.addView(“”, MainClass.class);
I have done that, but still the problem persists.

My code is like this:

HashMap<String, Class<? extends View>> routes = new HashMap<String, Class<? extends View>>() {
put(“/Members”, MemberList.class);
put(“/Events”, EventList.class);
put(“/Matches”, Matches.class);

nav = new Navigator(UI.getCurrent(), hrLytContent);
for (String route : routes.keySet()) {
nav.addView(route, routes.get(route));

I checked the demo application QuickTickets Dashboard which is basically similar to my application. Even this application is throwing exceptions when you try to go back to the root.

Please give me a solution. How can I customise navigation operation before it happens. I mean when I click the back button of the browser it should act based on the URL I specify in my code. Is it achievable in vaadin? or is there any other solution ? Please help me.