Bugfix in main.js