format Javascript code
fix misspelling
force first result to be displayed