fix to javascript code formatting