correction to javascript code sample