fixed javascriptbug