fixed javascript error in tut6