fix controller and main index