Modified main.php controller
Bugfix version1.1 for production