Fix a javascript error on Webkit browsers. fix #122