fixed index.php and main controller