small js fix for onclick event