fixed controller bugs and routes