javascript bugfix #2