fixed routes and some view bugs