url navigation half working, troubles with popstate event