Small Bugfix in Javascript