Smaller Bugfixes to script.js