make app finally work in html5 mode